import request from '@/utils/request';

export default {
    getNews(params) {
        return request({
            url: '/index/getNews',
            method: 'GET',
            params
        });
    },
    getSingleNews(id) {
        return request({
            url: '/index/getNews/' + id,
            method: 'GET'
        });
    },
    getSingleInfo(id) {
        return request({
            url: '/index/getInfo' + id,
            method: 'GET'
        });
    },
    getInfo(params) {
        return request({
            url: '/index/getInfo',
            method: 'GET',
            params,
        });
    },
    getBanner(id) {
        return request({
            url: '/index/getBanner/' + (id ? id : ''),
            method: 'GET'
        });
    },
    getSupplier(id) {
        return request({
            url: '/index/getSupplier/' + (id ? id : ''),
            method: 'GET'
        });
    },
    buyPage() {
        return request({
            url: '/index/good/buyPage',
            method: 'GET'
        });
    },
    sellPage() {
        return request({
            url: '/index/good/sellPage',
            method: 'GET'
        });
    },
    getVirtualData() {
        return request({
            url: '/index/getVirtualData',
            method: 'GET'
        });
    },
    buyRecord() {
        return request({
            url: '/index/good/buyRecord',
            method: 'GET'
        });
    },
    sellRecord() {
        return request({
            url: '/index/good/sellRecord',
            method: 'GET'
        });
    },
    dealRecord() {
        return request({
            url: '/index/good/dealRecord',
            method: 'GET'
        });
    },
    getAreaShowPrice(areaId) {
        return request({
            url: '/index/getAreaShowPrice',
            method: 'GET',
            params: { areaId }
        });
    },
    getPriceArea() {
        return request({
            url: '/index/getPriceArea',
            method: 'GET'
        });
    },
    getGlobalPrice() {
        return request({
            url: '/index/getGlobalPrice',
            method: 'GET'
        });
    }
};
